package com.gouaixin.bee.beeframework2.bean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Administrator on 2015/3/20.
 */


//{
//        "account": "cf_qutian",
//        "password": "123456",
//        "mobile": "13419527681",
//        "content":"消息测试"
//        }
public class SMS implements Serializable {
    String account;
    String password;

    String mobile;
    String content;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void  fromJson(JSONObject jsonObject)  throws JSONException
    {
        if(null == jsonObject){
            return ;
        }

        JSONArray subItemArray;

        this.account = jsonObject.optString("account");
        this.password = jsonObject.optString("password");
        this.mobile = jsonObject.optString("mobile");
        this.content = jsonObject.optString("content");
        return ;
    }


    public JSONObject toJson() throws JSONException
    {
        JSONObject localItemObject = new JSONObject();
        JSONArray itemJSONArray = new JSONArray();
        localItemObject.put("account", account);
        localItemObject.put("mobile", mobile);
        localItemObject.put("mobile", mobile);
        localItemObject.put("content", content);
        return localItemObject;
    }

}
